<template>
  <div>
   <el-form ref="form" :model="config.form" :label-width="config.labelWidth">
    <el-form-item label="活动名称">
        <el-input v-model="test"></el-input>
    </el-form-item>
   </el-form>
  </div>
</template>

<script>
import { toRefs,reactive,onMounted } from "vue"
export default {
   name:"Form",
   props: {
      config:{
          type:Object,
          default:()=>{}
      }
   },
   setup(props,context) {
       const data=reactive({
           form:{}
       });
       onMounted (()=>{
           console.log(props.config);
           console.log(context);
       }) 
       return {
           ...toRefs(data)
       }
   }
}
</script>

<style>

</style>